package com.theo.service.impl;

import com.theo.entity.MaskInfo;
import com.theo.mapper.MaskInfoMapper;
import com.theo.service.MaskInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 方涛
 * @since 2021-02-02
 */
@Service
public class MaskInfoServiceImpl extends ServiceImpl<MaskInfoMapper, MaskInfo> implements MaskInfoService {

    @Autowired
    private MaskInfoMapper maskInfoMapper;

    @Override
    public int saveMaskInfo(MaskInfo maskInfo) {
        return maskInfoMapper.insert(maskInfo);
    }

    @Override
    public int deleteMaskInfo(Integer id) {
        return maskInfoMapper.deleteById(id);
    }

    @Override
    public int updateMaskInfo(MaskInfo maskInfo) {
        return maskInfoMapper.updateById(maskInfo);
    }

    @Override
    public List<MaskInfo> queryAllMaskInfo() {
        return maskInfoMapper.selectList(null);
    }

    @Override
    public MaskInfo queryMaskInfoById(Integer id) {
        return maskInfoMapper.selectById(id);
    }
}
